include_directories(${game_SOURCE_DIR}/include)
add_executable(${EXECUTABLE_NAME} main.cpp Game.cpp mapLoader.cpp GlobalState.cpp Stats.cpp InputEngine.cpp
	./Tileset/tileset.cpp ./Tileset/tilesetObjectGroup.cpp Tileset/tilesetImage.cpp Tileset/tilesetPolygon.cpp Tileset/tilesetImageLayer.cpp  Tileset/tilesetPolyline.cpp Tileset/tilesetLayer.cpp Tileset/tilesetTile.cpp Tileset/tilesetObject.cpp Tileset/tilesetProperties.cpp 
	Objects/Object.cpp Objects/Character.cpp Objects/Treasure.cpp
	Items/Items.cpp 
	luaManager.cpp ./Bindings/luaDefinitionBinding.cpp
	GameModes/StateMachine.cpp GameModes/ObjectManager.cpp GameModes/Dialogue.cpp
	GameModes/TownMode/TownMode.cpp GameModes/TownMode/TownEvent.cpp GameModes/TownMode/TriggerArea.cpp
	GUI/GUIManager.cpp
	)

# Detect and add SFML
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
find_package(SFML 2.1 REQUIRED system window graphics network audio)
find_package(TinyXML REQUIRED)
find_package(Luabind REQUIRED)
target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES} ${TINYXML_LIBRARIES} ${LUABIND_LIBRARIES} ${LUA_LIBRARIES})
set(CMAKE_CXX_FLAGS "-std=c++0x")
